User GPIO
The 3DM-CV7 supports user-configurable GPIO pins which can be used for a variety of purposes as outlined below. The following table lists the features supported by each pin:
Logical Pin Number | Physical Connector Pin | Supported Features (X=supported) | Default Setting | ||
---|---|---|---|---|---|
General Purpose I/O | PPS | Events | |||
1 | Pin 7 | X | X | X | UNUSED |
2 | Pin 9 | X | X | X | UNUSED |
3 | Pin 6 | X | X | X | UNUSED |
4 | Pin 10 | X | X | X | UNUSED |
See Electrical for details on GPIO pin specifications.
The GPIO operate in the 0 - 3 volt range but will accept input voltages up to 5.5 volts without damage. The input impedance of the GPIO may decrease as the voltage exceeds 3 volts due to an internal clamping circuit.
GPIO Features
Unused
The unused mode is recommended when a GPIO pin will not be connected. This helps reduce EMI issues and power consumption.
General Input or Output ("GPIO" feature)
A pin can be used as a sampled input or as a general-purpose control output. The state of the pin can be controlled via the GPIO Configuration (0x0C,0x41 command. The state of a pin can be queried with the GPIO State (0x0C,0x42) command.
Pulse-per-Second (PPS)
The pulse-per-second (PPS) input or output can be used to synchronize time between the 3DM-CV7 and another system to achieve sub-microsecond synchronization. For full instructions on inputting or outputting a PPS, see PPS.
Event System
The GPIO can be used with the Event System for various purposes, such as time synchronization. See Action: GPIO and Trigger: GPIO for more details. When using the GPIO Trigger in edge mode, the GPIO feature should be set to the TIMESTAMP feature. Otherwise, set it to the GPIO feature for use with the event system.
Using the GPIO Configuration Command
The following details the use of the GPIO Configuration (0x0C,0x41) command. The above table details the possible values for the Pin parameter ("GPIO Pin") as well as the Feature(s) supported by each pin.
The feature, in combination with the behavior, determines what functionality will be enabled:
Pin
This parameter selects the pin a user is going to configure. This is a positive number starting at 1. When saving, loading, or restoring the default behavior, 0 may be specified to mean all pins.
Feature
This parameter determines the feature that will be enabled on the selected GPIO pin. Users should keep the pin in the unused state if it is not connected externally.
Behavior
This parameter defines the role a GPIO pin will play in implementing the selected Feature. For instance, if a user is defining pin 1 as supporting the PPS, a 2 passed to this parameter would configure the pin as a PPS_OUTPUT. However, if a user is defining pin 1 as supporting the GPIO, a 2 passed to this parameter would configure the initial state of this pin as a GPIO_OUTPUT_LOW. The interpretation of the value entered in this parameter depends on the Feature that is enabled.
Pin Mode
This parameter allows a user to alter the hardware configuration of the GPIO pins. This can be useful for interfacing with external equipment. The supported options are listed below by Feature. The GPIO Configuration (0x0C,0x41) command documentation provides more detail on the behavior of the pins when configured for open drain, pullup, and pulldown. The table below shows the supported configurations:
Feature | Behavior | Open Drain | Pullup | Pulldown |
---|---|---|---|---|
Unused | - | |||
GPIO | GPIO_INPUT | X | X | |
GPIO_OUTPUT | X | only if also open drain | ||
PPS | PPS_INPUT | |||
PPS_OUTPUT | ||||
Event Timestamp | X | X |